package com.sunwayworld.basemodule.business.pjtask.resource;

import com.alibaba.fastjson.JSONObject;
import com.sunwayworld.basemodule.business.pjtask.bean.LimsPjTaskBean;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sunwayworld.basemodule.business.pjtask.bean.LimsPjFolderEquipBean;
import com.sunwayworld.basemodule.business.pjtask.service.LimsPjFolderEquiptService;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@RequestMapping("/secure/basemodule/business/pj-folder-equipts")
public interface LimsPjFolderEquiptResource extends GenericResource<LimsPjFolderEquiptService, LimsPjFolderEquipBean, Long> {

    @Log(value = "结果录入退回任务调度", type = LogType.CONTROLLER)
    @PostMapping(value = "/back/result-folder")
    JSONObject backToFolder(RestJsonWrapperBean wrapperBean);

    @Log(value = "结果录入提交至结果审核", type = LogType.CONTROLLER)
    @PostMapping(value = "/submit/result-review")
    JSONObject submitToReview(RestJsonWrapperBean wrapperBean);

    @Log(value = "结果审核退回结果录入", type = LogType.CONTROLLER)
    @PostMapping(value = "/back/preview-result")
    JSONObject backToResult(RestJsonWrapperBean wrapperBean);

    @Log(value = "结果审核提交", type = LogType.CONTROLLER)
    @PostMapping(value = "/submit/preview-done")
    JSONObject submitReview(RestJsonWrapperBean wrapperBean);

    @Log(value = "结果审核提交至异常", type = LogType.CONTROLLER)
    @PostMapping(value = "/submit/preview-abnormal")
    JSONObject submitAbnormal(RestJsonWrapperBean wrapperBean);

    @Log(value = "结果录入 重新判定", type = LogType.CONTROLLER)
    @PostMapping(value = "/update/fomula")
    JSONObject updateFormula(RestJsonWrapperBean wrapperBean);

    @Log(value = "结果录入 检测目的下拉", type = LogType.CONTROLLER)
    @GetMapping(value = "/purpose-selections")
    List<LimsPjTaskBean> purposeSelections(@RequestParam(value = "id") Long id);
}
